import type { RouteRecordRaw } from 'vue-router'
export const ROOT_ROUTE_REDIRECT_PATH = '/dashboard'
const Layout = () => import('~/layouts/index.vue')
const basicRouteMap = {
  // iframe模式下使用
  Iframe: () => import('~/pages/common/iframe.vue'),
  // 一般用于存在子集的页面
  RouteView: () => import('~/pages/common/route-view.vue'),
}
export const rootRoute: RouteRecordRaw = {
  path: '/',
  name: 'rootPath',
  redirect: ROOT_ROUTE_REDIRECT_PATH,
  component: Layout,
  children: [],
}

export default [
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: () => import('~/pages/dashboard/analysis.vue'),
    meta: {
      title: '系统首页',
      icon: 'DashboardOutlined',
      keepAlive: true,
    },
  },
  {
    path: '/controll',
    name: 'Controll',
    component: () => import('~/pages/controll/controll.vue'),
    meta: {
      title: "运行控制",
      icon: 'FormOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/detection',
    name: 'Detection',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "单站监测",
      icon: 'LinkOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/energy',
    name: 'Energy',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "能耗分析",
      icon: 'BarsOutlined',
      keepAlive: false,
    },
  },

  {
    path: '/indicator',
    name: 'Indicator',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "指标评估",
      icon: 'ProfileOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/fee',
    name: 'Fee',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "收费管理",
      icon: 'ClusterOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/tactics',
    name: 'Tactics',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "控制策略",
      icon: 'WarningOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/statement',
    name: 'Statement',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "数据报表",
      icon: 'CheckCircleOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/operation',
    name: 'Operation',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "运行曲线",
      icon: 'TableOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/alarm',
    name: 'Alarm',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "报警记录",
      icon: 'UserOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/basic',
    name: 'Basic',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "基础信息",
      icon: 'BarsOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/dev',
    name: 'Dev',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "设备配置",
      icon: 'GoldOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/system',
    name: 'System',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "系统设置",
      icon: 'ClusterOutlined',
      keepAlive: false,
    },
  },
  {
    path: '/quit',
    name: 'Quit',
    component: () => import('~/pages/exception/403.vue'),
    meta: {
      title: "退出系统",
      icon: 'SwapRightOutlined',
      keepAlive: false,
      hideInBreadcrumb: true
    },
  },
  // ==
  // ================================================= 新增模块 | S
  // {
  //   path: '/dashboard',
  //   redirect: '/dashboard/analysis',
  //   name: 'Dashboard',
  //   meta: {
  //     title: '系统首页',
  //     icon: 'DashboardOutlined',
  //     hideInMenu: true
  //   },
  //   component: basicRouteMap.RouteView,
  //   children: [
  //     {
  //       path: '/dashboard/analysis',
  //       name: 'DashboardAnalysis',
  //       component: () => import('~/pages/dashboard/analysis.vue'),
  //       meta: {
  //         title: '分析页',
  //       },
  //     },
  //   ],
  // },
  // {
  //   path: '/form',
  //   redirect: '/form/basic',
  //   name: 'Form',
  //   meta: {
  //     title: '表单页',
  //     icon: 'FormOutlined',
  //     hideInMenu: true
  //   },
  //   component: basicRouteMap.RouteView,
  //   children: [
  //     {
  //       path: '/form/basic',
  //       name: 'FormBasic',
  //       component: () => import('~/pages/form/basic.vue'),
  //       meta: {
  //         title: '基础表单',
  //         hideInMenu: true
  //       },
  //     },
  //     {
  //       path: '/form/edit',
  //       name: 'FormEdit',
  //       component: () => import('~/pages/form/edit.vue'),
  //       meta: {
  //         hideInMenu: true,
  //         keepAlive: false,
  //         title: '编辑表单',
  //         hideInMenu: true
  //       },
  //     },
  //   ],
  // },
  // {
  //   path: '/link',
  //   redirect: '/link/iframe',
  //   name: 'Link',
  //   meta: {
  //     title: '链接',
  //     icon: 'LinkOutlined',
  //     hideInMenu: true
  //   },
  //   component: basicRouteMap.RouteView,
  //   children: [
  //     {
  //       path: '/link/iframe',
  //       name: 'LinkIframe',
  //       component: basicRouteMap.Iframe,
  //       meta: {
  //         title: 'AntDesign',
  //         url: 'https://ant.design/',
  //       },
  //     }, {
  //       path: '/link/antdv',
  //       name: 'LinkAntdv',
  //       component: basicRouteMap.Iframe,
  //       meta: {
  //         title: 'AntDesignVue',
  //         url: 'https://antdv.com/',
  //       },
  //     },
  //     {
  //       path: 'https://www.baidu.com',
  //       name: 'LinkExternal',
  //       meta: {
  //         title: '跳转百度',
  //         // target: '_self',
  //       },
  //     },
  //   ],
  // },
  // {
  //   path: '/menu',
  //   redirect: '/menu/menu1',
  //   name: 'Menu',
  //   meta: {
  //     title: '菜单',
  //     icon: 'BarsOutlined',
  //     hideInMenu: true
  //   },
  //   component: basicRouteMap.RouteView,
  //   children: [
  //     {
  //       path: '/menu/menu1',
  //       name: 'MenuMenu11',
  //       component: () => import('~/pages/menu/menu1.vue'),
  //       meta: {
  //         title: '菜单1',
  //       },
  //     },
  //     {
  //       path: '/menu/menu2',
  //       name: 'MenuMenu12',
  //       component: () => import('~/pages/menu/menu2.vue'),
  //       meta: {
  //         title: '菜单2',
  //       },
  //     },
  //     {
  //       path: '/menu/menu3',
  //       redirect: '/menu/menu3/menu1',
  //       name: 'MenuMenu1-1',
  //       meta: {
  //         title: '菜单1-1',
  //       },
  //       children: [
  //         {
  //           path: '/menu/menu3/menu1',
  //           name: 'MenuMenu111',
  //           component: () => import('~/pages/menu/menu-1-1/menu1.vue'),
  //           meta: {
  //             title: '菜单1-1-1',
  //           },
  //         }
  //       ],
  //     },
  //   ],
  // },
] as RouteRecordRaw[]
